package cn.kgc.controller;


import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

/**
 * @描述
 * @author：LY
 * @2018/11/9 9:20
 */
@Controller
public class StartController {

    @RequestMapping("/")
    public String index(){
        return "index";
    }



    @RequestMapping("backendlogin")
    public String backendlogin(){
        System.out.println("backendlogin页面");
        return "backendlogin";
    }

    @RequestMapping("devlogin")
    public String devlogin(){
        return "devlogin";
    }



    @RequestMapping("logout")
    public String logout(HttpServletRequest request){
        request.getSession().removeAttribute("devLogin");
        request.getSession().removeAttribute("userLogin");
        return "redirect:/";
    }

}
